package net.ch2.pc12.tech.ackborn.activity.helper;

import net.ch2.pc12.tech.ackborn.R;
import android.view.Menu;


public class MenuHelper {

	public static final int TYPE_BOARD_LIST  = 0;
	public static final int TYPE_THREAD_LIST = 1;
	public static final int TYPE_ARTICLE_LIST = 2;
	
	public static final int MENU_TO_TOP = 0;
	public static final int MENU_TO_BOTTOM = 1;
	public static final int MENU_RELOAD = 2;
	public static final int MENU_BLANK = 3;
	public static final int MENU_POST = 3;
	public static final int MENU_BOOKMARK = 4;
	public static final int MENU_ADD_BOOKMARK = 4;
	public static final int MENU_CONFIG = 5;

	public static void setMenu(Menu menu,int type){

		menu.add(0,MENU_TO_TOP,MENU_TO_TOP,R.string.ToTop);
		menu.add(0,MENU_TO_BOTTOM,MENU_TO_BOTTOM,R.string.ToBottom);
		menu.add(0,MENU_RELOAD,MENU_RELOAD,R.string.Reload);
		
		switch(type){
		
		case TYPE_BOARD_LIST:
			menu.add(0,MENU_BLANK,MENU_BLANK,R.string.Blank);
			menu.add(0,MENU_BOOKMARK,MENU_BOOKMARK,R.string.Bookmark);
			break;
		case TYPE_THREAD_LIST:
			menu.add(0,MENU_BLANK,MENU_BLANK,R.string.Blank);
			menu.add(0,MENU_BOOKMARK,MENU_BOOKMARK,R.string.Bookmark);
			break;
		case TYPE_ARTICLE_LIST:
			menu.add(0,MENU_POST,MENU_POST,R.string.Post);
			menu.add(0,MENU_ADD_BOOKMARK,MENU_ADD_BOOKMARK,R.string.AddBookmark);
			break;			
		default:
			menu.add(0,MENU_BLANK,MENU_BLANK,R.string.Blank);
			menu.add(0,MENU_BOOKMARK,MENU_BOOKMARK,R.string.Bookmark);
			break;	
		}
		
		menu.add(0,MENU_CONFIG,MENU_CONFIG,R.string.Config);

	}
	
	
}
